import Home from '@/auth/pages/Home'

export default {
  path: '/identification-assessment',
  name: 'identification-assessment',
  meta: {
    title: '辨识评估'
  },
  component: Home,
  children: [
    {
      path: 'risk-identification',
      name: 'risk-identification',
      meta: {
        title: '风险辨识',
        notCache: false
      },
      component: () => import('@/views/identification-assessment/index.vue')
    },
    {
      path: 'risk-identification/add/:type/:project',
      name: 'risk-identification-add',
      meta: {
        title: r => `${1 === r.params.type ? '总体辨识' : '动态辨识'}新增`,
        notCache: false
      },
      props: true,
      component: () => import('@/views/identification-assessment/add.vue')
    },
    {
      path: 'risk-identification/edit/:id',
      name: 'risk-identification-edit',
      meta: {
        title: '辨识编辑',
        notCache: false
      },
      props: true,
      component: () =>
        import('@/views/identification-assessment/single-edit.vue')
    },
    {
      path: 'risk-identification/revise-edit/:id',
      name: 'risk-identification-revise-edit',
      meta: {
        title: '风险修订',
        notCache: false
      },
      props: true,
      component: () =>
        import('@/views/identification-assessment/revise-edit.vue')
    },
    {
      path: 'risk-identification/control-edit/:id',
      name: 'risk-identification-control-edit',
      meta: {
        title: '动态辨识',
        notCache: false
      },
      props: true,
      component: () =>
        import('@/views/identification-assessment/control-edit.vue')
    },
    {
      path: 'risk-identification/detail/:id',
      name: 'risk-identification-detail',
      meta: {
        title: '辨识详情',
        notCache: true
      },
      props: true,
      component: () => import('@/views/identification-assessment/detail.vue')
    }
  ]
}
